# -*- coding: utf-8 -*-
import json, codecs, time, os
from pprint import pprint
import pandas as pd

df = pd.read_excel('Social listening车辆用户评价标签 0920.xlsx')

DICT = {}
for row_index, row in df.iterrows():
    first_level = row['二级指标']
    if first_level not in DICT.keys():
        DICT.update({ first_level : [] })
    second_level = row['三级指标']
    DICT[first_level].append(second_level)

with codecs.open(filename='feeling.json', mode='w', encoding='utf-8') as fw:
    json.dump(obj=DICT, fp=fw, ensure_ascii=False, indent=4)








